package com.road.vast.pojo.system;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.github.dreamyoung.mprelation.InverseJoinColumn;
import com.github.dreamyoung.mprelation.JoinColumn;
import com.github.dreamyoung.mprelation.JoinTable;
import com.github.dreamyoung.mprelation.ManyToMany;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author 郭泽鹏
 * @since 2020-07-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="PeRole对象", description="")
public class PeRole implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "角色id")
      @TableId(value = "id", type = IdType.ID_WORKER)
    private String id;

    @ApiModelProperty(value = "角色名称")
    private String name;

    @ApiModelProperty(value = "描述")
    private String description;

    @ApiModelProperty(value = "企业id")
    private String companyId;

    @ManyToMany
    @TableField(exist = false)
    @JoinColumn(name = "id", referencedColumnName = "role_id")
    @InverseJoinColumn(name = "id", referencedColumnName = "user_id")
    private List<BsUser> bsUser;//用户与角色   多对多

}
